#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time    : 2025/8/19
# @USER    : Shengji He
# @File    : util.py
# @Software: PyCharm
# @Version  : Python-
# @TASK:
import os
import random
import numpy as np
import torch


def set_random_seed(seed):
    random.seed(seed)
    np.random.seed(seed)
    torch.manual_seed(seed)
    torch.cuda.manual_seed(seed)
    torch.cuda.manual_seed_all(seed)
    os.environ['PYTHONHASHSEED'] = str(seed)
